package com.arpa.wms.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 仓库费用明细结算DTO
 * </p>
 *
 * @author LEO
 * @since 2020-11-17
 */
@Data
@ApiModel(value="ExpenseDetailSettlementDTO对象", description="仓库费用明细结算DTO")
public class ExpenseDetailSettlementDTO  {



    @Valid
    @ApiModelProperty(value = "计算明细" ,required = true)
    private List<SettlementItem> settlementItems;


    @Data
    public
    class SettlementItem{

        @ApiModelProperty(value = "费用标识" ,required = true)
        @NotNull(message = "费用标识不能为空")
        private String code;

        @ApiModelProperty(value = "本次结算金额",required = true)
        @NotNull(message = "本次结算金额不能为空")
        @Digits(integer = 14, fraction = 6, message = "请输入正确的单价")
        private BigDecimal thisSettledMoney;

    }

}
